# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

# requires rebuild on minor soname bumps

pkgname=soapyplutosdr
pkgver=0.2.1
_pkgname=SoapyPlutoSDR
_gitver=soapy-plutosdr-$pkgver
pkgrel=4
pkgdesc='Soapy SDR plugin for PlutoSDR'
arch=('loong64' 'x86_64')
url='https://github.com/pothosware/SoapyPlutoSDR'
license=('LGPL2.1')
depends=('soapysdr' 'libiio.so' 'libad9361')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('7016cde54cfa0c4acdff3d6e152f744ff68780185810071f1979f1b5cf9942d6173c45d1d6f4288190c8bc544e404a695972d8c169b596f67cf102e0dc7d5483')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}

